//
// Created by v on 19-6-13.
//

#include "OAVBase.h"

OAVBase::OAVBase() { m_conf = new CMConfigGeneral("./oav.json"); }

OAVBase::OAVBase(int argc, char **args)
{
    for (int i = 0; i < argc; i++)
    {
        m_args.push_back(args[i]);
    }
    m_conf = new CMConfigGeneral("./oav.json");
}

OAVBase::~OAVBase()
{
    if (m_conf)
    {
        delete m_conf;
    }
}

void OAVBase::tickStart() { m_tickStart = (double)cv::getTickCount(); }

void OAVBase::tickEnd() { m_tickEnd = (double)cv::getTickCount(); }

int OAVBase::getTickInterval()
{
    return (m_tickEnd - m_tickStart) / cv::getTickFrequency();
}
